import allure

from po.page.base_page import BasePage
from po.utils.log_utils import logger


class LoginPage(BasePage):
    """登录页面"""
    @allure.step("登录")
    def login(self):
        """
        通过cookie 登录
        :return:
        """
        self.open_url("https://work.weixin.qq.com/wework_admin/loginpage_wx")
        self.login_by_cookie()
        logger.info("登录到首页")
        from po.page.main_page import MainPage
        return MainPage(self.driver)

    def login_by_account(self):
        ...
